package com.tms.springboot.result;

/**
 * @Author: liha
 * @Description:
 */
public class ResultTool {
    public static JsonResult success() {
        return new JsonResult(true);
    }

    public static JsonResult success(ResultCode resultEnum) {
        return new JsonResult(true, resultEnum);
    }

    public static JsonResult success(Object data) {
        return new JsonResult(true, data);
    }

    public static JsonResult success(ResultCode resultEnum, Object data) {
        return new JsonResult(true, resultEnum, data);
    }

    public static JsonResult fail() {
        return new JsonResult(false);
    }

    public static JsonResult fail(ResultCode resultEnum) {
        return new JsonResult(false, resultEnum);
    }
}
